﻿using System;
using System.Collections.Generic;
using System.Linq;
using QFramework;
using UnityEngine;

namespace ProjectMyFarmAndShe
{
    public class ChallengeController : MonoBehaviour,IController
    {
        private void Start()
        {
            
        }

        private void OnCollisionEnter2D(Collision2D other)
        {
            if (other.gameObject.CompareTag("Player"))
            {
                UIGameController.Default.OpenChallengePanel();
            }
        }

        private void OnCollisionExit2D(Collision2D other)
        {
            if (other.gameObject.CompareTag("Player"))
            {
                UIGameController.Default.CloseChallengePanel();
            }
        }

        public IArchitecture GetArchitecture()
        {
            return Global.Interface;
        }
    }
}